package com.pioneer.cloudstorage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pioneer.cloudstorage.pojo.entity.FileMetadata;
import com.pioneer.cloudstorage.pojo.entity.Share;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SharesMapper extends BaseMapper<Share> {
    @Select("select file_name from file_metadata where id = #{fileId}")
    String getFileNameById(Long fileId);
@Select("select * from file_metadata where id = #{fileId}")
    FileMetadata getFile(Long fileId);
}
